from math import *
print ("Calcul de l'echelle")
print ("Calcul des distances")
print ("     --------")
print (" (1) Échelle")
print (" (2) Distance plan")
print (" (3) Distance réelle")
Choix=int(input("faire le choix 1, 2 ou 3 >>> "))
print ("     --------")
print ("")
if Choix==1:
	print ("Calcul de l'echelle")
	print ("           distance papier (m)")
	print ("Echelle = --------------------")
	print ("           distance reelle (m)")
	print ("")
	print ("")
	DistPapier=float (input("Distance papier (cm) ? "))
	DistReelle=float (input("Distance reelle      ? "))
	Echelle=(DistPapier/100)/DistReelle
	Denom=1/Echelle
	Denom=round(Denom, 3)
	print ("")
	print ("Echelle =", Echelle)
	print ("")
	print ("              1")
	print ("Echelle = ---------")
	print ("          ", Denom)
if Choix==2:
	print ("Calcul de la distance papier")
	print ("distance papier (m) = distance reelle (m) * Echelle")
	print ("")
	print ("              1")
	print ("Echelle = ---------")
	Echelle=float (input("          ? "))
	Echelle=1/Echelle
	DistReelle=float (input("Distance reelle (m)  ? "))
	DistPapier=DistReelle*Echelle
	print ("")
	DistPapier=round(DistPapier, 3)
	print ("distance papier (m)  =", DistPapier)
	DistPapier=round(DistPapier*100, 1)
	print ("distance papier (cm) =", DistPapier)
if Choix==3:
	print ("Calcul de la distance reelle")
	print ("distance reelle (m) = distance papier (m) / Echelle")
	print ("")
	print ("              1")
	print ("Echelle = ---------")
	Echelle=float (input("          ? "))
	Echelle=1/Echelle
	DistPapier=float (input("Distance papier (cm)  ? "))
	DistReelle=(DistPapier/100)/Echelle
	DistReelle=round(DistReelle, 3)
	print ("")
	print ("distance reelle (m)  =", DistReelle)
	if DistReelle>1000:
		DistReelle=DistReelle/1000
		DistReelle=round(DistReelle, 3)
		print ("distance reelle (km) =", DistReelle)
if Choix!=3 and Choix!=2 and Choix!=1:
	print ("Moi")
	print ("   pas comprendre")
	print ("                 toi")
Choix=int(input("PAUSE"))